package uk.ac.cam.cl.oscar.sift;

import java.io.*;
import java.util.Vector;
import java.awt.image.BufferedImage;
import javax.imageio.*;

public class SIFTTester
{
   public static final String imagefile = "C:\\Academia\\Oscar\\source\\tests\\high1.jpg";

   public static void main(String args[]) {
       try {
           File image = new File(imagefile);
           BufferedImage img = ImageIO.read(image);

           Vector<Keypoint> kplist = SIFT.findKeypoints(img);
           showKeypoints(kplist);
       } catch (IOException e) {
           System.out.println("Oh dear.");
       }
   }

   public static void showKeypoints(Vector<Keypoint> kplist)
   {
       for (int i=0; i<kplist.size(); i++) {
           Keypoint kp = kplist.elementAt(i);
           System.out.println("Keypoint " + i + ": (" + kp.getX() + ", " + kp.getY() + ") " +
                              kp.getScale() + ", " + kp.getImgScale() + ", " + kp.getOrientation());
       }
   }
}
